//
//  TCLYMineTableViewCell.m
//  YuErmuYing
//
//  Created by LYang on 16/8/11.
//  Copyright © 2016年 Tiancheng. All rights reserved.
//

#import "TCLYMineTableViewCell.h"
#import "Masonry.h"

@implementation TCLYMineTableViewCell
-(instancetype) initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]) {
        self.cellImageView = [[UIImageView alloc] init];
        [self addSubview:self.cellImageView];
        [self.cellImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(12);
            make.centerY.mas_equalTo(self);
            make.width.mas_equalTo(30);
            make.height.mas_equalTo(30);
        }];
        
        self.cellLabel = [[UILabel alloc] init];
        self.cellLabel.textColor = [UIColor blackColor];
        self.cellLabel.font = [UIFont systemFontOfSize:18];
        [self addSubview:self.cellLabel];
        [self.cellLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.cellImageView.mas_right).offset(10);
            make.centerY.mas_equalTo(self);
            make.width.mas_equalTo(40);
            make.height.mas_equalTo(20);
        }];
        
        UIImageView * logImageView = [[UIImageView alloc] init];
        logImageView.image = [UIImage imageNamed:@"direction"];
        [self addSubview:logImageView];
        [logImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(-12);
            make.centerY.mas_equalTo(self);
            make.width.mas_equalTo(10);
            make.height.mas_equalTo(20);
        }];
        
        UIImageView * lineImageView = [[UIImageView alloc] init];
        lineImageView.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineImageView];
        [lineImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(self);
            make.left.mas_equalTo(self.mas_left).offset(12);
            make.right.mas_equalTo(self.mas_right).offset(-12);
            make.height.mas_equalTo(1);
            
        }];
    }
    
    
    return self;
}
@end
